<template>
	<view class="page_box  ">
		<u-navbar :is-back="true" title="活动/路演" v-if="1" :border-bottom="false" title-color="#000"></u-navbar>
		<!-- <view class="h88"></view> -->
		<view class="content_box ">
			<z-paging
				ref="paging"
				v-model="dataList"
				@query="queryList"
				:default-page-size="5"
				loading-more-no-more-text="我也是有底线的！"
				:show-refresher-update-time="true"
				:refresher-update-time-key="4"
				use-page-scroll
			>
				<custom-refresher slot="refresher" slot-scope="{ refresherStatus }" :status="refresherStatus"></custom-refresher>

				<view class=" padding">
					<block v-for="(item, index) in dataList" :key="index">
						<view class="ww100 h342 bg-white u-relative">
							<u-lazy-load :image="item.image_url" mode="aspectFill" class="ww100 h342" imgMode="aspectFill" height="342"></u-lazy-load>
							<image
								src="../../static/mianfei.png"
								mode="aspectFill"
								class="w100 h50 bgimg"
								v-if="item.discount_price == '0.00'"
							></image>
						</view>
						<view class="mt28">
							<text class="f28 text-bold">{{ item.title }}</text>
						</view>
						<view class="flex justify-between align-center mt28">
							<view class="flex align-center ">
								<image src="../../static/time.png" mode="" class="w26 h26"></image>
								<text class="f26 text-gray ml10 block " style="width: 70vw; overflow: scroll; white-space: nowrap;">
									活动时间：{{ item.show_time }}
								</text>
							</view>
							<view class="padding-tb-xs padding-lr-sm round bolck" style="background-color: #F0F0F0" v-if="item.status == '已结束'">
								<text class="f24" style="color: #808080">{{ item.status }}</text>
							</view>
							<view class="padding-tb-xs padding-lr-sm round bolck" style="background-color: #DFF3FF" v-if="item.status == '活动中'">
								<text class="f24" style="color: #18A6F8">{{ item.status }}</text>
							</view>
							<view class="padding-tb-xs padding-lr-sm round bolck" style="background-color: #FFF1E3" v-if="item.status == '名额已满'">
								<text class="f24" style="color: #F48004">{{ item.status }}</text>
							</view>
							<view class="padding-tb-xs padding-lr-sm round bolck" style="background-color: #FFF2F1" v-if="item.status == '报名中'">
								<text class="f24" style="color: #F2736D">{{ item.status }}</text>
							</view>
						</view>
						<view class="mt28 flex align-center mb40" v-if="item.verify_status == 1">
							<image src="../../static/dui.png" mode="aspectFill" class="w26 h26"></image>
							<text class="f26 text-green ml10">您的路演申请通过，请按时与会</text>
						</view>
						<view class="mt28 flex align-center mb40" v-if="item.verify_status == 0">
							<image src="../../static/12161.png" mode="aspectFill" class="w26 h26"></image>
							<text class="f26  ml10" style="color: #FB8681;">您的路演审核未通过，请下次提前预约</text>
						</view>
						<view class="mt28 flex align-center mb40" v-if="item.verify_status == 2">
							<image src="../../static/12162.png" mode="aspectFill" class="w26 h26"></image>
							<text class="f26  ml10" style="color: #18A6F8;">您的路演申请正在审核中...</text>
						</view>
					</block>
				</view>
			</z-paging>
		</view>
		<yy-login v-if="vuex_login"></yy-login>
		<yy-loading text="加载中.." mask="true" click="true" ref="loading"></yy-loading>
		<u-toast ref="uToast" />
	</view>
</template>

<script>
export default {
	data() {
		return {
			field: {
				backgroundColor: '#000',
			},

			dataList: [],
		};
	},
	onShow() {},
	onLoad(e) {},
	methods: {
		async queryList(pageNo, pageSize) {
			let obj = {
				page: pageNo,
				page_size: pageSize,
			};
			const res = await this.$u.post('/Index/ownerActivity', obj, {});
			if (res.code) {
				console.log('res :>> ', res);
				this.$refs.paging.complete(res.data);
			}
		},
	},
};
</script>

<style lang="scss" scoped>
page_box {
	.content_box {
		.bgimg {
			position: absolute;
			top: 0;
			left: 0;
			// transform: translateX(-50%);
		}
	}
}
</style>
